Optimal. Leaf size=117 \[ -\frac {B \cos (e+f x) (a+a \sin (e+f x))^m}{f (1+m)}-\frac {2^{\frac {1}{2}+m} (A+A m+B m) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2}-m;\frac {3}{2};\frac {1}{2} (1-\sin (e+f x))\right ) (1+\sin (e+f x))^{-\frac {1}{2}-m} (a+a \sin (e+f x))^m}{f (1+m)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2830, 2731,
2730} \begin {gather*} -\frac {2^{m+\frac {1}{2}} (A m+A+B m) \cos (e+f x) (\sin (e+f x)+1)^{-m-\frac {1}{2}} (a \sin (e+f x)+a)^m \, _2F_1\left (\frac {1}{2},\frac {1}{2}-m;\frac {3}{2};\frac {1}{2} (1-\sin (e+f x))\right )}{f (m+1)}-\frac {B \cos (e+f x) (a \sin (e+f x)+a)^m}{f (m+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2730
Rule 2731
Rule 2830
Rubi steps
\begin {align*} \int (a+a \sin (e+f x))^m (A+B \sin (e+f x)) \, dx &=-\frac {B \cos (e+f x) (a+a \sin (e+f x))^m}{f (1+m)}+\frac {(A+A m+B m) \int (a+a \sin (e+f x))^m \, dx}{1+m}\\ &=-\frac {B \cos (e+f x) (a+a \sin (e+f x))^m}{f (1+m)}+\frac {\left ((A+A m+B m) (1+\sin (e+f x))^{-m} (a+a \sin (e+f x))^m\right ) \int (1+\sin (e+f x))^m \, dx}{1+m}\\ &=-\frac {B \cos (e+f x) (a+a \sin (e+f x))^m}{f (1+m)}-\frac {2^{\frac {1}{2}+m} (A+A m+B m) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2}-m;\frac {3}{2};\frac {1}{2} (1-\sin (e+f x))\right ) (1+\sin (e+f x))^{-\frac {1}{2}-m} (a+a \sin (e+f x))^m}{f (1+m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 1.28, size = 275, normalized size = 2.35 \begin {gather*} -\frac {(a (1+\sin (e+f x)))^m \left (\frac {\sqrt [4]{-1} 2^{-1-2 m} B e^{-\frac {3}{2} i (e+f x)} \left (-(-1)^{3/4} e^{-\frac {1}{2} i (e+f x)} \left (i+e^{i (e+f x)}\right )\right )^{1+2 m} \left (e^{2 i (e+f x)} (-1+m) \, _2F_1\left (1,m;-m;-i e^{-i (e+f x)}\right )-(1+m) \, _2F_1\left (1,2+m;2-m;-i e^{-i (e+f x)}\right )\right )}{-1+m^2}+\frac {2 \sqrt {2} A \cos ^{1+2 m}\left (\frac {1}{4} (2 e-\pi +2 f x)\right ) \, _2F_1\left (\frac {1}{2},\frac {1}{2}+m;\frac {3}{2}+m;\sin ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right )\right ) \sin \left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{(1+2 m) \sqrt {1-\sin (e+f x)}}\right ) \sin ^{-2 m}\left (\frac {1}{4} (2 e+\pi +2 f x)\right )}{f} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.66, size = 0, normalized size = 0.00 \[\int \left (a +a \sin \left (f x +e \right )\right )^{m} \left (A +B \sin \left (f x +e \right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \left (A + B \sin {\left (e + f x \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \left (A+B\,\sin \left (e+f\,x\right )\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________